import React from 'react';
import { ConfigProvider, Input } from 'antd';
import { ReactNode } from 'react';
// import 'antd/dist/'

type Props = {
  children: ReactNode;
};
const Entry = (props: Props) => {
  const changeTheme = (e: any) => {
    console.log(e.target.value);
    document.documentElement.style.setProperty('--ant-primary-color', e.target.value);
  };

  return (
    <ConfigProvider>
      <Input type="color" onChange={changeTheme} style={{width: '60px', height:'30px'}} />
      {props.children}
    </ConfigProvider>
  );
};

export default Entry;
